Wrap selection in the AutoSuggestBox#3817
Conversation
…p- and Down Arrow keys
|
So what is happening is XAMLTest runs two processes, one for the test and one for the WPF App. For all of the dependency properties it generates extension methods for the getters and setters. However, for the values to flow back and forth from the WPF process to the test process they must be serialized. The fallback is to just There is an escape hatch option, which lets you declare a method in your test code, that will be executed from the WPF process. As long as you make its return type something that can be serialized, you can pass back whatever you want. In the suggestion below I do this to get the count of the suggestions by directly acting on the AutoSuggestBox. Hey @corvinsz, while reviewing your PR, I'd suggest the following code changes: You can also review and apply these suggestions locally on your machine. Learn more about GitKraken Code Suggest
Join your team on GitKraken to speed up PR review. |
|
Ah I see.. I wasn't aware of that. Thanks for the explanation 😊 |
fixes #3815
As shown in the linked issue, currently users can null the
SelectedItemof the internalListBoxusing the up/down arrow keys.@Keboo I also tried to add tests for this case, but I can't get it to work. It might be a me-problem, but I couldn't figure out how to access the ItemSource/Suggestions of the

AutoSuggestBox. Instead of the actual suggestions, I got back a List of characters saying "(Collection)":I need the ItemSource/Suggestions to assert that the "last" (Suggestions.Count - 1) item is selected. Could this be a bug with your XAML test library or am I simply using it wrong?